/***********************************************************************
 *
 * MODULE NAME:    avrcp.h
 * PROJECT CODE:   host side stack
 * DESCRIPTION:    avrcp platform interface
 * MAINTAINER:     Mark Donnelly
 * CREATION DATE:  08 March 2000
 *
 * LICENSE:
 *     This source code is copyright (c) 2000-2001 RDA Microelectronics
 *     All rights reserved.
 *
 * REVISION HISTORY:
 * 
 *
 * ISSUES:
 * 
 ***********************************************************************/
#ifndef _RDABT_AVRCP_H_
#define _RDABT_AVRCP_H_



/*! 
	@brief Operation ID, used to identify operation. See table 9.21 AV/C Panel
	Subunit spec. 1.1 #
*/
typedef enum
{
	OPID_SELECT				= (0x0),
	OPID_UP,
	OPID_DOWN,
	OPID_LEFT,
	OPID_RIGHT,
	OPID_RIGHT_UP,
	IPID_RIGHT_DOWN,
	OPID_LEFT_UP,
	OPID_LEFT_DOWN,
	OPID_ROOT_MENU,
	OPID_SETUP_MENU,
	OPID_CONTENTS_MENU,
	OPID_FAVOURITE_MENU,
	OPID_EXIT,
	/* 0x0e to 0x1f Reserved */
	OPID_0					= (0x20),
	OPID_1,
	OPID_2,
	OPID_3,
	OPID_4,
	OPID_5,
	OPID_6,
	OPID_7,
	OPID_8,
	OPID_9,
	OPID_DOT,
	OPID_ENTER,
	OPID_CLEAR,
	/* 0x2d - 0x2f Reserved */
	OPID_CHANNEL_UP			= (0x30),
	OPID_CHANNEL_DOWN,
	OPID_SOUND_SELECT,
	OPID_INPUT_SELECT,
	OPID_DISPLAY_INFORMATION,
	OPID_HELP,
	OPID_PAGE_UP,
	OPID_PAGE_DOWN,
	/* 0x39 - 0x3f Reserved */
	OPID_POWER				= (0x40),
	OPID_VOLUME_UP,
	OPID_VOLUME_DOWN,
	OPID_MUTE,
	OPID_PLAY,
	OPID_STOP,
	OPID_PAUSE,
	OPID_RECORD,
	OPID_REWIND,
	OPID_FAST_FORWARD,
	OPID_EJECT,
	OPID_FORWARD,
	OPID_BACKWARD,
	/* 0x4d - 0x4f Reserved */
	OPID_ANGLE				= (0x50),
	OPID_SUBPICTURE,
	/* 0x52 - 0x70 Reserved */
	OPID_F1					= (0x71),
	OPID_F2,
	OPID_F3,
	OPID_F4,
	OPID_F5,
	OPID_VENDOR_UNIQUE		= (0x7e)
	/* Ox7f Reserved */
} t_AVC_OPERATION_ID; 




typedef enum 
{
	AVRCP_INITIALISING,
	AVRCP_READY,
	AVRCP_CONNECTING,
	AVRCP_CONNECTED
} t_AVRCP_STATE;


typedef struct
{
    u_int8   seq_id;
    u_int8   c_type;
    u_int8   subunit_type;
    u_int8   subunit_id;
    u_int16  data_len;
    u_int16  profile_id;
    u_int8   frame_data[20];
} t_avrcp_cmd_frame_ind;

typedef struct
{
    u_int8 connect_id;
    u_int16 result;
    t_bdaddr device_addr;
}t_avrcp_connect_inf;

APIDECL1 t_api APIDECL2 Avrcp_Init(void);
APIDECL1 t_api APIDECL2 Avrcp_Set_State(t_AVRCP_STATE state);
APIDECL1 t_api APIDECL2 Avrcp_Connect_Req(t_bdaddr bdaddr);
APIDECL1 t_api APIDECL2 Avrcp_Disconnect_Req(void);

APIDECL1 t_api APIDECL2 Headset_Send_Pause(void);
APIDECL1 t_api APIDECL2 Headset_Send_Play(void);
APIDECL1 t_api APIDECL2 Headset_Send_Stop(void);
APIDECL1 t_api APIDECL2 Headset_Send_Forward(void);
APIDECL1 t_api APIDECL2 Headset_Send_Backward(void);
APIDECL1 t_api APIDECL2 Headset_Send_Fast_Forward(void);
APIDECL1 t_api APIDECL2 Headset_Send_Rewind(void);


#endif //_RDABT_AVRCP_H_

